<div class="row">
 <div class="span3 bs-docs-sidebar ">
 	<*include file="<*$controller*>/location.tpl"*>
  </div>
  <div class="span9"> 
  	<div class="table_content">
		<div class="ta_top"></div>
		<div class="ta_in">
   <*if $result|@count neq 0*>  
   <table cellpadding="0" cellspacing="0" class="table">
		<tr> 
			<th class="span3">标题</th>
            <th class="span3">内容</th>
            <th class="span2">类型</th>
			<th class="span2">发布时间</th>
			<th class="span2">发布人</th> 
            <th class="span2">操作</th>
			<th>&nbsp;</th>
		</tr>
      
    <*foreach from=$result item=a key =key name=foo*>
		<tr> 
			<td><*$a.notice_title*></td>
            <td><*$a.notice_content|truncate:15*></td>
            <td><*if $a.notice_type eq creditshop*>商城公告<*else*>apk<*/if*></td>
			<td><*$a.addtime|date_format:"%Y-%m-%d"*></td>
			<td>admin</td>  
            <td>
            <a   role="button" class="btn btn-primary"   onclick="javascript:editit(<*$a.noticeid*>,<*$pageNum*>)"><i class="icon-pencil icon-white"> </i> 修改</a> 
          <button type="button" class="btn " onclick="javascript:deleteit(<*$a.noticeid*>,<*$pageNum*>)" ><i class="icon-trash"></i>删除</button>
        
            </td>
            <td>&nbsp;</td>
		</tr>
		<*/foreach*>
       <tr>
        	<td colspan="8"> <*$page*></td>
            <td>&nbsp;</td>
        </tr>
      <*else*>  
          <tr>
        	<td colspan="8"> 还没有发布公告信息哦！</td>
            <td>&nbsp;</td>
        </tr> 
        
        <*/if*>
        </table>
        </div>
    <div class="ta_bottom"></div>
	  </div> 
    </div>
</div> 
<script type="text/javascript" src="/js/prototype.js"></script>
<script type="text/javascript"> 
	function deleteit(id,pageNum)
	{
	  if(confirm("删除将不能恢复")){
	   window.location='/<*$controller*>/delete/id/'+id+'/pageNum/'+pageNum;
	   }
	}

	function editit(id,pageNum)
	{ 
		window.location='/<*$controller*>/modifiy/id/'+id+'/pageNum/'+pageNum;
	} 
</script>
